﻿
using System;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using System.Collections.Generic;
using System.Threading.Tasks;
using LZ.DCode.OrganizationUnits;
using LZ.DCode.OrganizationUnits.Dto;

namespace LZ.DCode.OrganizationUnits
{
    /// <summary>
    /// 组织单位应用层服务的接口方法
    ///</summary>
    public interface IOrganizationUnitsAppService : IApplicationService
    {
        Task<ListResultDto<OrganizationUnitDto>> GetOrganizationUnits();

        Task<PagedResultDto<OrganizationUnitUserListDto>> GetOrganizationUnitUsers(GetOrganizationUnitUsersInput input);

        Task<OrganizationUnitDto> CreateOrganizationUnit(CreateOrganizationUnitInput input);

        Task<OrganizationUnitDto> UpdateOrganizationUnit(UpdateOrganizationUnitInput input);

        Task<OrganizationUnitDto> MoveOrganizationUnit(MoveOrganizationUnitInput input);

        Task DeleteOrganizationUnit(EntityDto<long> input);

        Task RemoveUserFromOrganizationUnit(UserToOrganizationUnitInput input);

        Task RemoveRoleFromOrganizationUnit(RoleToOrganizationUnitInput input);

        Task AddUsersToOrganizationUnit(UsersToOrganizationUnitInput input);

        Task AddRolesToOrganizationUnit(RolesToOrganizationUnitInput input);

        Task<PagedResultDto<NameValueDto>> FindUsers(FindOrganizationUnitUsersInput input);

        Task<PagedResultDto<NameValueDto>> FindRoles(FindOrganizationUnitRolesInput input);

        
        /// <summary>
        /// 获取Nz格式树
        /// </summary>
        /// <returns></returns>
        Task<List<OrganizationUnitNzTreeNode>> GetTreesAsync();
       /// <summary>
       /// 获取单条数据
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
        Task<OrganizationUnitDto> GetByIdAsync(long id);

    }
}

